/* gallery Banner */
.gallery-banner {
  background-color: #43da87; 
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px; /* desktop height */
  text-align: center;
  padding: 20px;
}

/* Text Styling */
.gallery-content p {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #000;
  margin-bottom: 8px;
}

.gallery-content h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #000;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .gallery-banner {
    height: 220px;
  }

  .gallery-content h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .gallery-banner {
    height: 180px;
  }

  .gallery-content p {
    font-size: 12px;
  }

  .gallery-content h2 {
    font-size: 20px;
  }
}

.gallery-section {
  background-color: #fff;
  padding: 40px;
}

/* Grid layout */
.gallery-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;   /* ✅ uniform height */
  gap: 15px;
}

/* Card */
.gallery-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* caption at bottom */
  align-items: center;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  border-radius: 6px;
  background: #000; /* fallback bg behind image */
  position: relative;
}

/* Image always fills container */
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* ✅ keeps proportion but crops */
  border-radius: 6px;
  transition: transform 0.3s ease;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Caption overlay */
.gallery-caption {
  position: relative;
  z-index: 2;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.5); /* ✅ semi-transparent overlay */
  width: 100%;
  text-align: center;
  letter-spacing: 1px;
}

/* Hover effect */
.gallery-card:hover img {
  transform: scale(1.05);
}

/* Wide / Tall */
.card-wide {
  grid-column: span 2;
}
.card-tall {
  grid-row: span 2;
}

.extra-card-margin {
  margin-top: 0px;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Lightbox inner wrapper */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  max-width: 90vw;   /* ✅ responsive instead of fixed */
  max-height: 90vh;
  background: #111;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;  /* ✅ ensures media won’t spill out */
}

/* Media inside (image or video) */
.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 80vh;  /* ✅ keeps media inside viewport */
  object-fit: contain;
  border-radius: 8px;
  animation: zoomIn 0.3s ease;
}

/* Caption at bottom */
.lightbox-caption {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 1px;
  text-align: center;
  padding: 6px 12px;
  background: rgba(0,0,0,0.6);  /* ✅ overlay bar look */
  border-radius: 6px;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 32px;
  font-weight: 300;     /* ✅ thin elegant lines */
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  font-family: 'Helvetica Neue', Arial, sans-serif; /* ✅ modern clean */
  letter-spacing: 2px;
}

.lightbox-close:hover {
  color: #d4af37;       /* ✅ subtle luxury gold hover */
  transform: scale(1.1);
}

/* Lightbox arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  background: rgba(116, 106, 106, 0);
  border: none;
  color: #054321;
  cursor: pointer;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 50%;
  transition: 0.3s;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0);
  color: #d4af37;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Thumbnails */
.lightbox-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  padding: 5px;
}
.lightbox-thumbnails img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.7;
  transition: 0.3s;
}
.lightbox-thumbnails img.active {
  border: 2px solid #d4af37;
  opacity: 1;
}
.lightbox-thumbnails img:hover {
  opacity: 1;
}

/* Animation */
@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .card-wide { grid-column: span 2; }
}
@media (max-width: 480px) {
.gallery-section {
  background-color: #fff;
  padding: 10px;
}

  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* ✅ 2 columns instead of 1 */
    grid-auto-rows: 160px;                  /* ✅ uniform playful blocks */
    gap: 10px;
  }

  .extra-card-margin {
  margin-top: 40px;
}

  /* Make every 3rd card span 2 columns (like a big block) */
  .gallery-card:nth-child(3n) {
    grid-column: span 2;
    grid-row: span 1;
    height: 200px; /* taller for variety */
  }

  /* Add variety for tall cards */
  .gallery-card:nth-child(5n) {
    grid-row: span 2;
    height: auto;
  }

  .gallery-card img {
    border-radius: 8px;
  }

  /* Caption overlay more bold on mobile */
  .gallery-caption {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    background: rgba(0,0,0,0.65);
    letter-spacing: 1px;
  }
}
